1. Field of the Invention
The present invention relates to image processing apparatus and method for performing arithmetic processing on image data on a per pixel-of-interest basis while referring to peripheral pixels, and relates to a storage medium storing a program for executing the image processing method.
2. Description of the Related Art
Image processing has conventionally been known, in which arithmetic processing is performed on image data on a per pixel-of-interest basis, while referring to peripheral pixels, by using an FIR-type digital filter or the like. FIG. 19 shows the outline of image processing for performing five-tap filter processing.
Referring to FIG. 19, input image data INDAT is constituted by pixels D1 to D14. At locations outward of image ends 1601 and 1602, there are no pixels (hereinafter, referred to as ineffective pixels). Reference numerals 1603, 1604 denote ineffective pixels which are located leftward of the image left end 1601. Reference numerals 1605, 1606 denote ineffective pixels located rightward of the image right end 1602.
Prior to executing five-tap filter processing, image data CPDAT is obtained by performing image copy 1607 to copy the pixel D1 of the input image data INDAT to positions of the ineffective pixels 1603, 1604 and by performing image copy 1608 to copy the pixel D14 of the input image data INDAT to positions of the ineffective pixels 1605, 1606.
Next, based on the image data CPDAT, five-tap filter processing is performed on each pixel of interest of the input image data INDAT. More specifically, five-tap filter processing 1611 for the pixel of interest D1 is performed based on the pixel of interest D1 and peripheral pixels (i.e., two copied pixels D1 and pixels D2, D3) to obtain a pixel O1 of output image data OUTDAT, and five-tap filter processing for the pixel of interest D2 is performed based on the pixel of interest D2 and peripheral pixels (i.e., copied pixel D1 and pixels D1, D3, and D4) to obtain a pixel O2 of the output image data OUTDAT. Further, five-tap filter processing for each of pixels of interest D3 to D14 is performed to obtain each of pixels O3 to O14 of the output image data OUTDAT. Reference numeral 1619 denotes five-tap filter processing for the pixel of interest D9.
FIG. 20 shows in block diagram an example construction of a conventional image processing apparatus.
As shown in FIG. 20, the image processing apparatus includes a pixel copy unit 201 that copies image end pixels, an image processor 202 that performs image processing such as filter processing, and a region information controller 203 that controls image region position information. In accordance with image left end copy region information COPYLWIN and image right end copy region information COPYRWIN which are supplied from the region information controller 203, the pixel copy unit 201 copies image end pixels of the input image data INDAT to positions of ineffective pixels of the input image data INDAT, thereby generating image data CPDAT. The image processor 202 performs filter processing on the image data CPDAT supplied from the pixel copy unit 201, and generates output image data OUTDAT based on the filter-processed image data CPDAT in accordance with output image region information OUTWIN supplied from the region information controller 203.
FIG. 21 shows a timing chart of input and output signals in the image processing apparatus of FIG. 20. In the illustrated example, clock signals are numbered consecutively beginning from 1 and referred to as clocks 1, 2, 3, and so on.
Referring to FIG. 21, the pixel copy unit 201 of the image processing apparatus sequentially inputs the pixels D1 to Dn (=D14) (illustration of which is partly omitted) of the input image data INDAT at clocks 4 to 17, inputs the image left end copy region information COPYLWIN at clocks 4 and 5, and copies the pixel D1 at clocks 5 and 6. The pixel copy unit 201 inputs the image right end copy region information COPYRWIN at clocks 20 and 21, and copies the pixel Dn at clocks 21 and 22. At clocks 5 to 22, the pixel copy unit 201 sequentially outputs the pixels D1, D1, D1, D2 to Dn, Dn, and Dn of the image data CPDAT.
The image processor 202 inputs the image data CPDAT and the output image region information OUTWIN, and sequentially outputs the pixels O1 to On (=O14) of the output image data OUTDAT at clocks 9 to 22.
FIR filter processing similar to that described above is proposed in Japanese Laid-open Patent Publication No. H08-138045.
With the above-described conventional image processing and with the filter processing disclosed in Japanese Laid-open Patent Publication No. H08-138045, in a case that image processing is performed while referring to peripheral pixels, pixels at image ends are copied to prevent image end parts of an output image from having undefined values. However, there is a fear that image quality in vicinity of image ends is deteriorated since the same image processing is performed at the image ends as that performed at other image regions.
Also proposed is filter processing where a deblocking filter is used to eliminate a problem that a generated image has a block-like appearance due to a difference in pixel values of adjacent blocks (ITU-T H.264 written standards). With this proposed filter processing, however, there is a fear that image quality in vicinity of image ends of an output image is deteriorated since no effective image region is taken into account in image processing performed at image ends of input image data.